package org.pixelami.twisted.spread.flavors
{
	public class Copyable
	{
		/*
		"""Subclass me to get copied each time you are returned from or passed to a remote method.

	    When I am returned from or passed to a remote method call, I will be
	    converted into data via a set of callbacks (see my methods for more
	    info).  That data will then be serialized using Jelly, and sent to
	    the peer.
	
	    The peer will then look up the type to represent this with; see
	    L{RemoteCopy} for details.
	    """
	    */
		
		public function Copyable()
		{
		}
		
		
		/*
	    def getStateToCopy(self):
	        """Gather state to send when I am serialized for a peer.
	
	        I will default to returning self.__dict__.  Override this to
	        customize this behavior.
	        """
	
	        return self.__dict__
	
	    def getStateToCopyFor(self, perspective):
	        """
	        Gather state to send when I am serialized for a particular
	        perspective.
	
	        I will default to calling L{getStateToCopy}.  Override this to
	        customize this behavior.
	        """
	
	        return self.getStateToCopy()
	
	    def getTypeToCopy(self):
	        """Determine what type tag to send for me.
	
	        By default, send the string representation of my class
	        (package.module.Class); normally this is adequate, but
	        you may override this to change it.
	        """
	
	        return reflect.qual(self.__class__)
	
	    def getTypeToCopyFor(self, perspective):
	        """Determine what type tag to send for me.
	
	        By default, defer to self.L{getTypeToCopy}() normally this is
	        adequate, but you may override this to change it.
	        """
	
	        return self.getTypeToCopy()
	
	    def jellyFor(self, jellier):
	        """Assemble type tag and state to copy for this broker.
	
	        This will call L{getTypeToCopyFor} and L{getStateToCopy}, and
	        return an appropriate s-expression to represent me.
	        """
	
	        if jellier.invoker is None:
	            return getInstanceState(self, jellier)
	        p = jellier.invoker.serializingPerspective
	        t = self.getTypeToCopyFor(p)
	        state = self.getStateToCopyFor(p)
	        sxp = jellier.prepare(self)
	        sxp.extend([t, jellier.jelly(state)])
	        return jellier.preserve(self, sxp)
		*/


	}
}

